import Immutable from 'seamless-immutable';
import * as types from '../constants/ActionTypes';

const login = Immutable.from({
  error: false
});
export default function loginReducer(state = login, action) {
  switch (action.type) {
    case types.LOGIN:
      return action.payload;
    case types.LOGINERROR:
      return state.setIn(['error'], true);
    default:
      return state;
  }
}
